# example how I wish to configurate my active_background

ActiveBackground::Initializer.configure do |config|
  # configuration for master server and middleman
  
  config.server(:master).host='localhost'
  config.server(:master).port=9595
  config.server(:master).name='active_background'
  config.server(:master).sleep=1
  config.server(:master).background=false
  
  config.logging(File.dirname(__FILE__) + '/../log/active_background.log', 7, 10000000000) do |logger|
    logger.level = Logger::DEBUG
  end
  
  config.rails.enable=false
  
  config.database do |db|
    db.lib_type=:active_record
    db.maximum_connections=50
    db.adapter='mysql'
    db.host='localhost'
    db.username='root'
    db.database='activebookmark'
  end
    
  config.server(:slave1) do |server_config|
    server_config.host='63.41.21.2'
    server_config.port=9100
    server_config.server_name='active_background_slave1'
    server_config.fallback=1
  end
  
  config.job do |job|
    job.dir=config.root+'/workspace/jobs/'
  end
  
  config.environment=:development
    
#  config.access_control(:master, :slave1, :slave2, :slave3) do |ac|
#    ac.allow :localhost
#    ac.disallow '*'
#  end
end